<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<jsp:include page="/pages/sysIndex/default.jsp"/>
<script src="<c:url value="/resources/bootstrap/js/bootstrap-datetimepicker.min.js" />"></script>
<script src="<c:url value="/resources/bootstrap/js/bootstrap-datetimepicker.zh-CN.js" />"></script>
<link rel="stylesheet" href="<c:url value="/resources/bootstrap/css/bootstrap-datetimepicker.css" />">
<style>

</style>
<div class="main-content">
    <div class="box box-main">
        <form id="assignDateForm" model="post" action="<c:url value="/web/admin/inspectionOrder/editOrder.action"/>"
              enctype="multipart/form-data"
              method="post" class="form-horizontal">
            <div class="box-footer">
                <div class="col-xs-12">
                    <div class="form-group">
                        <label class="control-label col-sm-3" title=""><span class="required ">*</span>
                            工单编号：<i class="fa icon-question hide"></i></label>
                        <div class="col-sm-9">
                            <input type="hidden" name="ids"  value="${ids}">
                            <input name="orderCode" id="orderCode" disabled  class="form-control" value="${inspectionOrder.orderCode}">
                            <input type="hidden" name="type" id="type" value="-1">

                        </div>
                    </div>
                </div>
                <div class="col-xs-12">
                    <div class="form-group">
                        <label class="control-label col-sm-3" title="">
                            <span class="required ">*</span> 不通过原因：<i class="fa icon-question hide"></i></label>
                        <div class="col-sm-9">
                             <textarea name="reason" rows="4" maxlength="200"
                                       class="form-control"></textarea>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-sm btn-primary" id="btnSubmit"><i
                                class="fa fa-check"></i>
                            保 存
                        </button>&nbsp;

                        <button type="button" class="btn btn-sm btn-default" id="btnCancel" onclick="closeView()"><i
                                class="fa fa-times"></i> 关 闭
                        </button>
                    </div>
                </div>
            </div>
        </form>
    </div>
</div>


<script>
    $("#assignDateForm").validate({
        submitHandler: function (form) {
            js.ajaxSubmitForm($(form), function (data) {
                js.showMessage(data.msg);
                if (data.status == Global.NO) {
                    closeView();
                    parent.$("#dataGrid").dataGrid("refresh");

                }
            }, "json");
        }
    });
    var date = new Date();
    // var endDate=Date.parse($("#end").val());
    $("#endDate").datetimepicker({
        format: 'yyyy-mm-dd hh:ii',
        startDate: date,
        endDate:$("#end").val(),
        language:'zh-CN',
        // minView: 0,//设置只显示到分钟
        autoclose:true,//选中关闭
        todayBtn: true//今日按钮
    });




    function closeView() {
        var index = parent.layer.getFrameIndex(window.name);
        parent.layer.close(index);
    }


</script>


